	
	
	 ReadFromRegistry
	

	


	

	



WScript.Quit





Sub ReadFromRegistry()


Dim strComputer, strKey, strSubKey
Dim objRegistry
Dim arrSubKeys()
Dim strDisplayName, strDisplayVersion, strInstallLocation, strPublisher, strInstallDate


Set objRegistry = GetObject("winmgmts:"   & "{impersonationLevel=Impersonate}!\\.\root\default:StdRegProv")

Const HKEY_LOCAL_MACHINE = &H80000002

strKey = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"

objRegistry.EnumKey HKEY_LOCAL_MACHINE, strKey, arrSubKeys


For Each strSubKey In arrSubKeys

    objRegistry.GetStringValue HKEY_LOCAL_MACHINE, _
                               strKey & "\" & strSubKey, _
                               "DisplayName", _
                               strDisplayName

    objRegistry.GetStringValue HKEY_LOCAL_MACHINE, _
                               strKey & "\" & strSubKey, _
                               "DisplayVersion", _
                               strDisplayVersion

    objRegistry.GetStringValue HKEY_LOCAL_MACHINE, _
                               strKey & "\" & strSubKey, _
                               "InstallLocation", _
                               strInstallLocation

    objRegistry.GetStringValue HKEY_LOCAL_MACHINE, _
                               strKey & "\" & strSubKey, _
                               "Publisher", _
                               strPublisher

    objRegistry.GetStringValue HKEY_LOCAL_MACHINE, _
                               strKey & "\" & strSubKey, _
                               "InstallDate", _
                               strInstallDate

	dim sTmp 
	sTmp=""
	if not isNull(strDisplayName) then
	if InStr(strDisplayName,"Microsoft")<>0 OR InStr(strPublisher,"Microsoft") OR InStr(strSubKey,"Microsoft")<>0 		then
		 sTmp = sTmp & strSubKey & vbtab & _
			 strDisplayName & vbtab & _
			 strInstallLocation & vbtab & _
			 "0" & vbtab & _
			 strPublisher & vbtab & _
		     strDisplayVersion & vbtab & _
		     strInstallDate	
	Wscript.Echo sTmp
	Wscript.sleep 1000
  	end if
	end if    
	
Next
End sub













